﻿<Window x:Class="AutoCompleteBoxWPF.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:toolkit="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Input.Toolkit"
        Title="AutocompleteBox" Height="300" Width="300">
    <Grid>
        <!-- Si es que es suficiente haciendo override al metodo .ToString() de la clase en cuestión -->
        <!--<toolkit:AutoCompleteBox x:Name="AutoCompleteBox"
                                 ValueMemberPath="Name"
                                 FilterMode="Contains"
                                 VerticalAlignment="Top"
                                 Margin="24"/>-->

        <toolkit:AutoCompleteBox x:Name="AutoCompleteBox"
                                 ValueMemberPath="Name"
                                 FilterMode="Contains"
                                 VerticalAlignment="Top"
                                 Margin="24">
            <toolkit:AutoCompleteBox.ItemTemplate>
                <DataTemplate>
                    <StackPanel Orientation="Horizontal">
                        <TextBlock Text="{Binding Name}" Foreground="Orange"/>
                        <TextBlock Text=" - "/>
                        <TextBlock Text="{Binding AffiliationDate, StringFormat='ddd dd MMM yyyy'}"/>
                    </StackPanel>
                </DataTemplate>
            </toolkit:AutoCompleteBox.ItemTemplate>
        </toolkit:AutoCompleteBox>
    </Grid>
</Window>
